#ifndef LJSERVER_H
#define LJSERVER_H

#include "proxydialog.h"
#include <QString>
#include <QByteArray>
#include <QNetworkAccessManager>
#include <QUrl>
#include <QNetworkRequest>
#include <QNetworkReply>
#include <QDate>
#include <QTime>
#include <QStringList>
#include <QNetworkProxy>


class LJServer : public QObject
{
    Q_OBJECT

public:

    QNetworkReply *reply;
    QStringList respondList;
    int respondListCount;
    QNetworkProxy proxy;
    ProxyDialog proxyWindow;

    LJServer();
    void Login (QString user, QString password);
    void Post (QString user, QString password, QString text, QString subj, QString music, QString tags);
    void Refresh (QString user, QString password,  int eventCount, bool allEvents);

protected:

    QNetworkReply *SendRequest (QString textRequest);

signals:
    void answerready();
    void progress(qint64, qint64);

public slots:
    void readyReadReply();
    void downProgress(qint64,qint64);
    void setProxy(bool, QString, QString, QString, QString);

};

#endif // LJSERVER_H
